[SPARK-3469] Make sure all TaskCompletionListener are called even with failures#2343
[SPARK-3469] Make sure all TaskCompletionListener are called even with failures#2343rxin wants to merge 5 commits intoapache:masterfrom
Conversation
Note that this also changes the fault semantics of TaskCompletionListener. Previously failures in TaskCompletionListeners would result in the task being reported as failed. With this change, tasks won't be reported as failed simply because the execution of TaskCompletionListener fails.
|
Jenkins, add to whitelist. |
|
Jenkins, test this please. |
|
QA tests have started for PR 2343 at commit
|
|
QA tests have finished for PR 2343 at commit
|
|
QA tests have started for PR 2343 at commit
|
|
QA tests have started for PR 2343 at commit
|
|
QA tests have finished for PR 2343 at commit
|
|
QA tests have finished for PR 2343 at commit
|
|
Do we need to change the semantics though ? We could still save the first exception and return a task failure ? |
|
What do you think would be a good way to handle this? Perhaps throw back the first exception encountered? or throw an exception with all the error messages |
|
Ok I pushed a new version that creates a TaskCompletionListenerException that contains all the error messages. |
|
QA tests have started for PR 2343 at commit
|
|
QA tests have finished for PR 2343 at commit
|
|
I left a minor comment - Otherwise LGTM |
|
Jenkins, retest this please |
|
QA tests have started for PR 2343 at commit
|
|
QA tests have finished for PR 2343 at commit
|
|
Ok merging this in master. Thanks for taking a look. |
This is necessary because we rely on this callback interface to clean resources up. The old behavior would lead to resource leaks.
Note that this also changes the fault semantics of TaskCompletionListener. Previously failures in TaskCompletionListeners would result in the task being reported immediately. With this change, we report the exception at the end, and the reported exception is a TaskCompletionListenerException that contains all the exception messages.